﻿@using MVCMongo.Services
@model MVCMongo.ViewModel.UserProfileViewModel
@{
    ViewBag.Title = "UserProfileEdit";
    Layout = "~/Views/Shared/_LayoutProfile.cshtml";
}

<div class="container-fluid">
    <div class="span3">
        @if (!string.IsNullOrEmpty(Model.Users.ImageUrl))
        {
            <img src="~/Content/UserProfile/User/@Model.Users.ImageUrl" width="200px" />
        }
        else
        {
            <img src="~/Content/UserProfile/img/NoImage.jpg" width="200px" />


        }
    </div>
    <div class="span8">
        <h3>@Model.Users.FirstName @Model.Users.LastName</h3>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="box ">
                @*<div class="box-title">
                        <h3>
                            <i class="icon-user"></i>
                            Edit user profile
                        </h3>
                    </div>*@
                <div class="box-content ">
                    <ul class="tabs tabs-inline tabs-top">
                        <li class="active">
                            <a data-toggle="tab" href="#profile"><i class="icon-user"></i> About</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#notifications"><i class="icon-bullhorn"></i> Friends</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#security"><i class="icon-lock"></i> Photos</a>
                        </li>
                    </ul>
                    <div class="tab-content nopadding tab-content-inline tab-content-bottom">
                        <div id="profile" class="tab-pane active">
                            <div class="span12">
                                <div class="span6">




                                    <h5>
                                        Basic Information

                                    </h5>
                                    <div class="control-group">
                                        <label for="textfield" class="control-label">First Name: <b>@Model.Users.FirstName</b></label>

                                    </div>
                                    <div class="control-group">
                                        <label for="password" class="control-label">Last Name: <b>@Model.Users.LastName</b></label>

                                    </div>



                                    @*<div class="form-actions">
                                            <button type="submit" class="btn btn-primary">Save changes</button>
                                            <button type="button" class="btn">Cancel</button>
                                        </div>*@


                                </div>

                                <div class="span6">

                                    <h5>
                                        Contact Information

                                    </h5>
                                    <div class="control-group">
                                        <label for="textfield" class="control-label">
                                            Country: <b>
                                                @if (Model.UserDetails != null)
                                                {
                                                    @Model.UserDetails.Country
                                                }
                                            </b>
                                        </label>
                                        <div class="controls">

                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label for="textfield" class="control-label">
                                            City: <b>
                                                @if (Model.UserDetails != null)
                                                {
                                                    @Model.UserDetails.City
                                                }
                                        </b>
                                    </label>

                                </div>
                                <div class="control-group">
                                    <label for="textfield" class="control-label">
                                        Mobile No: <b>
                                            @if (Model.UserDetails != null)
                                            {
                                                @Model.UserDetails.MobileNo
                                            }
                                    </b>
                                </label>

                            </div>
                            <div class="control-group">
                                <label for="textfield" class="control-label">
                                    Region: <b>
                                        @if (Model.UserDetails != null)
                                        {
                                            @Model.UserDetails.Religion
                                        }
                                </b>
                            </label>

                        </div>

                    </div>
                </div>
                <div class="span12">
                    <div class="span6">

                        <h5>
                            About You
                        </h5>
                        <div class="control-group controls-row">

                            <div class="controls">
                                @if (Model.UserDetails != null)
                                {
                                    @Model.UserDetails.AboutYout
                                }

                            </div>
                        </div>

                    </div>

                    <div class="span6">

                        <h5>
                            Favorite Quotations
                        </h5>
                        <div class="control-group controls-row">

                            <div class="controls">
                                @if (Model.UserDetails != null)
                                {
                                    @Model.UserDetails.FavQuotation
                                }

                            </div>
                        </div>

                    </div>
                </div>
            </div>

            <div id="notifications" class="tab-pane">

                <div class="box box-bordered ">
                    <div class="box-title">
                        <h3 style="width: 100%">
                            <i class="icon-user"></i>
                            Friends
                            <span class="pull-right">
                                Friend Requests <span class="">(@UtilityService.FindingFriend(WebSecurity.CurrentUserId))</span>
                            </span>
                        </h3>
                        <br />
                        <ul class="icon-nav" style="list-style: none">
                            <li>
                                All Friends (@Model.UserFriendList.Count())
                            </li>

                        </ul>

                    </div>

                </div>

                @foreach (var item in Model.UserFriendList)
                {
                    <div class="span3">
                        <div class="box ">

                            <div class="box-content">
                                <table class="table table-user table-nohead">
                                    <tbody>
                                        <tr>

                                            <td class="">

                                                <img alt="" src="/content/UserProfile/User/@item.ImageUrl" width="120px" height="120px">


                                            </td>
                                            <td class="user">

                    <a href="@Url.Action("UserFriendProfile", new {friendId=item.UserId})">  @item.FullName</a>

</td>

                                        </tr>


                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                }



            </div>
            <div id="security" class="tab-pane">
                <form class="form-horizontal" action="#">
                    <div class="control-group">
                        <label class="control-label" for="asdf">Disable account for</label>
                        <div class="controls">
                            <select id="email" name="email">
                                <option value="1">1 week</option>
                                <option value="2">2 weeks</option>
                                <option value="3">3 weeks</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="asdf">Lock account?</label>
                        <div class="controls">
                            <a class="btn btn-danger" href="more-locked.html">Lock account now</a>
                        </div>
                    </div>
                    <div class="form-actions">
                        <input type="submit" value="Save" class="btn btn-primary">
                        <input type="reset" value="Discard changes" class="btn">
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>

@*<div class="row-fluid">
        <div class="span12">
            <div class="box box-bordered">
                <div class="box-title">
                    <h3><i class="icon-th-list"></i> User Profile Edit</h3>
                </div>
                <div class="box-content nopadding">
                    @using (Html.BeginForm("UserProfileEdit", "Profile", FormMethod.Post, new { @class = "form-horizontal form-striped", enctype = "multipart/form-data" }))
                    {

                        @Html.HiddenFor(x=>x.UserName)
                        @Html.HiddenFor(x=>x.Gender)
                        @Html.HiddenFor(x=>x.BirthDay)

                        <div class="control-group">
                            <label for="textfield" class="control-label">First Name</label>
                            <div class="controls">
                                @Html.TextBoxFor(x => x.FirstName, new { @class = "input-xlarge", @placeholder = "Text input" })
                            </div>
                        </div>
                        <div class="control-group">
                            <label for="password" class="control-label">Last Name</label>
                            <div class="controls">
                                @Html.TextBoxFor(x => x.LastName, new { @class = "input-xlarge", @placeholder = "Text input" })
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Image</label>
                            <div class="controls">
                                <input type="file" name="picture">
                            </div>
                        </div>

                        <div class="form-actions">
                            <button type="submit" class="btn btn-primary">Save changes</button>
                            <button type="button" class="btn">Cancel</button>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>*@


